<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<meta name="viewport" id="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<meta name="format-detection" content="telephone=no" />
		<link rel="stylesheet" href="./css/reset.css" type="text/css"/>
		<link href="./css/my-indent.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
		<!-- 弹出层api -->
		<script type="text/javascript" src="js/layer/layer.js"></script>
	</head>
	<body>
		<div class="zjzz-buylist-wear">
			<div class="zjzz-buylist-top">
				<a href="personal-center.jsp" class="zjzz-buylist-t1"></a>
				<span class="zjzz-buylist-t2">我的订单</span>
				<span class="zjzz-buylist-t3">
					<span class="zjzz-buylist-t4"></span>
				</span>
			</div>
			<div class="zjzz-buylist-top2">			
				<a href="./my-indent-all.jsp" class="zjzz-buylist-tp1">
					<i>全部</i>
				</a>
				<a href="./my-indent-dfk.jsp" class="zjzz-buylist-tp1">
					<i>待付款</i>
					<span class=""></span>
				</a>
				<a href="./my-indent-dsh.jsp" class="zjzz-buylist-tp1">
					<i class="zjzz-buylist-tp2">待收货</i>
					<span class=""></span>
				</a>
				<a href="./my-indent-pj.jsp" class="zjzz-buylist-tp1">
					<i>评论</i>
					<span class=""></span>
				</a>
			</div>			
			<div class="zjzz-buylist-mid">
				<!--全部-->
				<div class="zjzz-buylist-m1">
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript">
		$(function(){
			var path="<%=request.getSession().getAttribute("path")%>";
			$.post("../../../tszs/txr/routin_status.do",function(data){
		    	 var html="";
		    	 for (var i = 0; i < data.data.length; i++) {
		    		 html+="<div class='zjzz-buylist-m1'>"+
					"<span class='zjzz-buylist-allact'>  </span>"+
					"<div class='zjzz-buylist-goods1'>"+
						"<div class='zjzz-buylist-gtime'>"+
							"<span class='zjzz-buylist-gtime1'>"+data.data[i].createtime+"</span>"+
							"<span class='zjzz-buylist-gtime2'>待收货</span>"+
						"</div>"+
						"<div class='zjzz-buylist-det'>"+
							"<img src='/file/"+data.data[i].phtoto+"' />"+
							"<div class='zjzz-buylist-gdetail'>"+
								"<span class='zjzz-buylist-gtit1'>"+data.data[i].c_name+"<br>"+data.data[i].c_describe+"</span> "+
							"<span class='zjzz-buylist-gmoney'> "+
									"<i class='zjzz-buylist-gm1'>￥"+data.data[i].href.split("--")[0]+"</i> <i class='zjzz-buylist-gm2'>x"+data.data[i].product_num	+"</i>"+
								"</span>"+
							"</div>"+
						"</div>"+
						"<span class='zjzz-buylist-goodsm'> "+
						"<i class='zjzz-buylist-gm3'>共"+data.data[i].product_num+"件</i> "+
						"<i>应付总额：<i class='zjzz-buylist-gm4'>￥"+data.data[i].href.split("--")[0]+"</i></i>"+
						"</span>"+
						"<div class='zjzz-buylist-btn'>"+
						"<a class='zjzz-buylist-btn2' href=\"javascript:shopCarURL('"+data.data[i].p_id+"')\")'>"+data.data[i].href.split("--")[1]+"</a>"+
						"</div>"+
					"</div>"+
				"</div>";
				}
		    	 $(".zjzz-buylist-m1").html(html);
		     },"json")
		})
		function shopCarURL(id){
			layer.confirm("确认收货？", {icon: 3, title:"提示信息"}, function(){
				//确认收货
				$.post("../txr/confirmOrder.do",{pId:id},function(res){
					layer.msg('确认收货成功！');
					setTimeout(function(){
						location.reload();
					}, 800)
				},"json")
			})
		}
	</script>
</html>
